package igou.togogo.service.impl;

import igou.togogo.bean.EBrand;
import igou.togogo.bean.EBrandExample;
import igou.togogo.mapper.EBrandMapper;
import igou.togogo.pojo.EgouResult;
import igou.togogo.service.IBrandService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class BrandServiceImpl implements IBrandService {

    @Autowired
    EBrandMapper brandMapper;

    @Override
    public EgouResult getBrandList() {
        EBrandExample example = new EBrandExample();
        List<EBrand> list = brandMapper.selectByExample(example);
        return EgouResult.ok(list);
    }

    @Override
    public List<EBrand> selectByExample() {
        EBrandExample example = new EBrandExample();
        List<EBrand> list = brandMapper.selectByExample(example);
        return list;
    }
}
